<template>
  <div class="app-container">
    <dxf-viewer
      :dxf-url="dxfUrl"
      height="800px"
    />
  </div>
</template>

<script>
import DxfViewer from '@/components/DxfViewer'

export default {
  name: 'Test',
  components: {
    DxfViewer
  },
  data() {
    return {
      dxfUrl: 'http://mysql.fnaiot.com:9000/house/house-documents/fd63b745-876b-4705-a37d-7e4ddb13e541.dxf'
    }
  },
  methods: {
    onLoadingProgress({ phase, processed, total }) {
      console.log(`加载进度: ${phase}, ${processed}/${total}`)
    },
    onLoadSuccess() {
      //this.$message.success('DXF文件加载成功')
    },
    onLoadError(error) {
      console.error('DXF文件加载失败:', error)
    }
  }
}
</script>

<style scoped>
.app-container {
  padding: 20px;
}
</style>